Skip to content

Secure Opencode CLI runs with staged per-scenario workspaces#430

Merged
DhavalRepo18 merged 1 commit into
mainfrom
opencode_agent
Jul 3, 2026
Merged

Secure Opencode CLI runs with staged per-scenario workspaces#430
DhavalRepo18 merged 1 commit into
mainfrom
opencode_agent

Conversation

@ChathurangiShyalika

Copy link
Copy Markdown
Collaborator

This PR updates the Opencode scenario-suite flow so CLI agents can still use file and bash tools, but only inside a clean per-scenario workspace.

Changes include:

  • Stage each Opencode benchmark run into an isolated workspace outside the repo.
  • Copy only allowed scenario inputs into the workspace:question.txt, manifest.json, manifest-referenced data files
  • Exclude benchmark-only artifacts such as: groundtruth.txt, reports/, traces/, previous outputs
  • Run Opencode from the staged workspace instead of the repository root.
  • Hide benchmark artifact paths from the Opencode subprocess environment.
  • Reject unsafe workspace roots inside the repo when file/bash/edit tools are enabled.
  • Add tests for workspace staging and unsafe workspace validation.

Signed-off-by: Chathurangi Shyalika <chathurangishyalika@Chathurangis-MacBook-Pro.local>
@DhavalRepo18 DhavalRepo18 merged commit ef918d4 into main Jul 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants